package Game;


import javax.swing.ImageIcon;
import javax.swing.JLabel;

@SuppressWarnings("serial")
public class RepresentacionGrafica extends JLabel{

	
	protected ImageIcon[] imagenes;
		/**
		 * Constructor de la clase
		 * @param imsgenes Imagenes que corresponden al objeto
		 * @param startPos posicion inicial en el tablero en el eje x
		 * @param altura posicion en Y del elemento
		 */
		public RepresentacionGrafica(ImageIcon[] imagenes,int x, int y)
		{
			super();
			this.imagenes=imagenes;
			this.setBounds(x, y, 50,50);
			this.setIcon(imagenes[0]);
			
		}
		
		public RepresentacionGrafica(int x, int y)
		{
			super();
			this.imagenes=null;
			this.setBounds(x, y, 50,50);

		}
		
		
	
		public void setPos(int x,int y){
			this.setLocation(x, y);
		}
		
		//manejo del robot
		
		public void setAbajo()
		{
			this.setIcon(imagenes[2]);
		}
		
		public void setDer()
		{
			this.setIcon(imagenes[1]);
		
		}
		
		
		public void setIzq()
		{
			this.setIcon(imagenes[3]);
			
		}
		
	
		public void setArriba()
		{
			this.setIcon(imagenes[0]);
		}
		
		
		//manejo de objetos
		
		public void setCaja(){
			this.setIcon(imagenes[0]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);

		}
		
		public void setLlegada(){
			this.setIcon(imagenes[1]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);
			
		}
		
		public void setPlanta(){
			this.setIcon(imagenes[2]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);

		}
		
		
		public void setPared(){
			this.setIcon(imagenes[3]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);
			
		}
		
		public void setConoArena(){
			this.setIcon(imagenes[4]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);

		}
		public void setConoAsfalto(){
			this.setIcon(imagenes[5]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);

		}
		

		
		public void setConcreto (){
			this.setIcon(imagenes[6]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);
			
		}
		
		public void setBalizaArena(){
			this.setIcon(imagenes[7]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);
			
		}
		
		public void setBalizaAsfalto(){
			this.setIcon(imagenes[8]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);
			
		}

		
		
		//manejo de piso
		
		public void setArena(){
			this.setIcon(imagenes[0]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);

		}



		public void setAsfalto() {
			this.setIcon(imagenes[1]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);
			
		}
		
		public void setFuego (){
			this.setIcon(imagenes[2]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);
			
		}
		
		public void setAgua(){
			this.setIcon(imagenes[3]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);
			
		}
		
		public void setStar(){
			this.setIcon(imagenes[4]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), imagenes[2].getIconWidth(),imagenes[2].getIconHeight());

		}
		
		//*Manejo de premios*/
		
		public void setBalasArena(){
			this.setIcon(imagenes[0]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), imagenes[2].getIconWidth(),imagenes[2].getIconHeight());

		}

		public void setBalasAsfalto(){
			this.setIcon(imagenes[1]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), imagenes[2].getIconWidth(),imagenes[2].getIconHeight());
			
		}
		
		public void setPuntosArena(){
			this.setIcon(imagenes[2]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), imagenes[2].getIconWidth(),imagenes[2].getIconHeight());

		}

		public void setPuntosAsfalto(){
			this.setIcon(imagenes[3]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), imagenes[2].getIconWidth(),imagenes[2].getIconHeight());

		}
		
		public void setCombustibleArena(){
			this.setIcon(imagenes[4]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), imagenes[2].getIconWidth(),imagenes[2].getIconHeight());

		}

		public void setCombustibleAsfalto(){
			this.setIcon(imagenes[5]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), imagenes[2].getIconWidth(),imagenes[2].getIconHeight());

		}

		public void setNegro() {
			this.setIcon(imagenes[5]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);
			
		}
		
		public void setBlanco() {
			this.setIcon(imagenes[6]);
			this.setBounds((int)this.getLocation().getX(), (int)this.getLocation().getY(), 50,50);
			
		}
		
		
	}


